﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VendorTransactions.ascx.cs" Inherits="Gollie.Controls.VendorTransactions" %>
<%@ Register Src="~/Controls/GraphControl.ascx" TagPrefix="uc1" TagName="GraphControl" %>

<p class="title">Transacties</p>

    <div style="float:left;">
        <table>
            <tr>
                <td colspan="2" style="text-align:left; font-weight:bold;">Periode</td>
            </tr>
            <tr>
                <td>Van:</td><td><asp:TextBox runat="server" ID="tbDateFrom" CssClass="input-datepicker" ClientIDMode="Static" MaxLength="10" Width="8em"></asp:TextBox></td>
            </tr>
            <tr>
                <td>t/m:</td><td><asp:TextBox runat="server" ID="tbDateTo" CssClass="input-datepicker" ClientIDMode="Static" MaxLength="10" Width="8em"></asp:TextBox></td>
            </tr>
            <tr>
                <td colspan="2" style="text-align:left;"><asp:Button ID="btnPeriod" runat="server" Text="Verstuur"/></td>
            </tr>
        </table>
    </div>
<div style="clear:both;"></div>
<hr />
<uc1:GraphControl runat="server" ID="GraphControl" />
<br />
<asp:HiddenField ID="tbTotTransactions" runat="server" />

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" DataKeyNames="Dag" OnDataBinding="GridView1_DataBinding" OnRowDataBound="GridView1_RowDataBound" HorizontalAlign="Center" ShowFooter="True" ShowHeaderWhenEmpty="True" Width="100%" AllowSorting="true" OnSorting="GridView1_Sorting">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="Dag" HeaderText="Dag" DataFormatString="{0:dd-MMM-yyyy}" FooterText="Totaal" SortExpression="Dag">
            <HeaderStyle CssClass="offer-grid-header" />
            <ItemStyle CssClass="offer-grid-cell" />
            <FooterStyle HorizontalAlign="Right"/>
            </asp:BoundField>

        <asp:TemplateField ItemStyle-Width="224px" HeaderText="Bedrag" ItemStyle-HorizontalAlign="Right" SortExpression="Bedrag">
            <ItemTemplate>
                <table style="width: 100%;">
                    <tr>
                        <td style="text-align: left; vertical-align: top;">
                            <asp:Panel ID="pnlExpandCollapseImage" runat="server">
								<img class='expand-collapse' targetid='div<%# Eval("DagString")%>'/>
                            </asp:Panel>
                       </td>
                        <td style="text-align: right; vertical-align: top;">
                            <span><%# Eval("Bedrag")%></span>
                        </td>
                    </tr>
                </table>
                <div id='div<%# Eval("DagString")%>' style="display: none;">
                    <asp:GridView ID="grdViewTransactions" runat="server" AutoGenerateColumns="false" CellPadding="4" ForeColor="#333333" BackColor="#400080" ShowHeader="false" Width="100%">
                        <RowStyle BackColor="#b7b6b3" ForeColor="#333333" />
                        <AlternatingRowStyle BackColor="#d7d6d3" ForeColor="#284775" />
                        <columns>
                            <asp:BoundField DataField="Datum" DataFormatString="{0:dd-MMM-yyyy, HH:mm}">
                                <ItemStyle CssClass="offer-grid-cell" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Bedrag" DataFormatString="{0:c}">
                                <ItemStyle CssClass="offer-grid-cell" />
                            </asp:BoundField>
                        </columns>
                    </asp:GridView>
                </div>
 
            </ItemTemplate>
            <HeaderStyle CssClass="offer-grid-header" />
            <ItemStyle CssClass="offer-grid-cell" />
            <FooterStyle HorizontalAlign="Right"/>
            </asp:TemplateField>

          </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#000000" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#000000" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
